<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>颜色</title>
    <style>
        h1 {
            color: red;
            color: #00ff00;
            color: #00f;
            color: rgb(255, 255, 0);
            color: rgba(255, 0, 0, 0.3);
        }
        #d1{
            width: 200px;
            height: 200px;
            background-color: pink;
            /*设置显示的背景图片*/
            background-image: url("../6.jpg");
            /*设置背景图片的尺寸：宽  高*/
            background-size: 90px 120px;
            /*禁止重复*/
            background-repeat: no-repeat;
            /*控制位置：横向x  纵向y 通过像素偏移值*/
            background-position: 20px 50px;
            /*控制位置：横向x 纵向y 通过百分比*/
            background-position: 100% 50%;
        }
        #d2{
            width: 611px;
            height: 376px;
            background-color: #e8e8e8;
            background-image: url("http://doc.canglaoshi.org/tstore_v1/images/itemCat/study_computer_img1.png");
            background-repeat: no-repeat;
            background-position: 90% 80%;

        }
    </style>
</head>
<body>
<h1>颜色测试</h1>
<div id="d1">背景测试1</div>
<div id="d2">背景测试2</div>
</body>
</html>